#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
struct stu
{
	char name[10];
	char sex[5];
	int age;
};
int main()
{
	struct stu S = { 0 };
	FILE* pf = fopen("text.txt", "r");
	if (pf == NULL)
	{
		perror("Error opening file");
	}
	fscanf(pf, "%s%s%d", S.name, S.sex, &(S.age));
	printf("%s %s %d", S.name, S.sex, S.age);
	fclose(pf);
	pf = NULL;
	return 0;
}